<template>
  <div id="app">
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      :router="true"
    >
      <el-menu-item index="/home">首页</el-menu-item>
      <el-menu-item index="/music">音乐</el-menu-item>
      <el-menu-item index="/404" disabled style="width:100px;">消息中心</el-menu-item>
      <el-menu-item index="/users/login" style="width:100px;">用户登录</el-menu-item>
    </el-menu>

    <keep-alive>
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  data() {
      return {
        activeIndex: '/home',
      }
  },
  methods: {
    handleSelect(key, keyPath) {
      // console.log(key, keyPath);
    }
  },
};
</script>

<style scope>
a{
  text-decoration: none;
}
</style>
